package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IEditPersonMessageModel;
import com.wgts.wgts.mvp.model.imp.EditPersonMessageModel;
import com.wgts.wgts.mvp.presenter.IMyCenterMessageActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.MyCenterMessageActivityPresenter;
import com.wgts.wgts.mvp.view.IMyCenterMessageActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/9/2919:54
 *
 */
@Module
public class MyCenterMessageActivityModule {
    private IMyCenterMessageActivityView view;

    public MyCenterMessageActivityModule(IMyCenterMessageActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IMyCenterMessageActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IEditPersonMessageModel provideModel(NetService netService){
        return new EditPersonMessageModel(netService);
    }

    @ActivityScope
    @Provides
    public IMyCenterMessageActivityPresenter providePresenter(IMyCenterMessageActivityView view, IEditPersonMessageModel model){
        return new MyCenterMessageActivityPresenter(view, model);
    }
}
